package com.fmy.security.service.login;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @ClassName CustAuthenticationHolder
 * @Description TODO 线程级变量类
 * @createTime 2019/9/10 10:12
 */
public class CustAuthenticationHolder {

    private static ThreadLocal<CustAuthentication> threadLocal = new ThreadLocal<>();

    public static CustAuthentication get() {
        return threadLocal.get();
    }

    public static void clear() {
        threadLocal.remove();
    }

    public static void set(CustAuthentication authentication) {
        threadLocal.set(authentication);
    }
}
